package com.lollipop.chain.advancedchain;


/**
 * @Author: J.K
 * @Date: 2021-08-31 13:31
 * @Description:
 */
public class HtmlFilter implements Filter {
    @Override
    public void doFilter(Request request, Response response, FilterChain chain) {
        // process the html tag <>
        request.requestStr = request.requestStr.replace('<', '[')
                .replace('>', ']') + "---HTMLFilter()";
        // 执行过滤器链中的方法
        chain.doFilter(request, response, chain);
        response.responseStr += "---HTMLFilter()";
    }
}
